<%--
  Created by IntelliJ IDEA.
  User: 何祥
  Date: 2022/4/20
  Time: 18:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
    <title>员工办理离职页面</title>
    <script src="/js/jquery-1.7.2.min.js"></script>
</head>

<body>

    <div align="center">员工离职登记</div><br>

    <form method="post" action="http://qxtice.natappfree.cc/xm/user/updateUserStatus">
        <table border="1" align="center">

            <tr align="center">
                <td>姓名</td>
                <td>
                    <input id="name" name="name" value="${user.name}" />
                </td>
            </tr>


            <tr align="center">
                <td>工号</td>
                <td>
                    <input id="no" name="no" value="${user.no}"/>
                </td>
            </tr>


            <tr align="center">
                <td>职位</td>
                <td>
                    <input id="position" name="position" value="${user.position}"/>
                </td>
            </tr>

            <tr align="center">
                <td>状态</td>
                <td>
                    <input id="status" name="status" value="${user.status}"/>
                </td>
            </tr>

            <tr align="center">
                <td>原因</td>
                <td>
                    <input id="reason" name="reason" type="text" />
                </td>
            </tr>

            <tr align="center">
                <td></td>
                <td>
                    <input value="提交" type="submit" />
                </td>
            </tr>

        </table>

    </form>

    <%--<div align="center">
        <button id="out" name="${user.id}">确认办理</button>
    </div>--%>


</body>

<script>

    /*办理离职按钮实现*/
    /*$("#out").click(function (){

        var id = $("#out").name;
        var status = "2";
        var reason = $("#reason").val();
        var url = "http://localhost:8080/user/updateUserStatus";

        var data = {
            "id":id,
            "status":status,
            "reason":reason
        }

        alert(data.id+data.reason+data.status);

        $.ajax({
            type:"post",
            url:url,
            data:JSON.stringify(data),
            dataType:"text",
            contentType:"application/json",
            success:function (data) {
                var url = "http://localhost:8080/user/findAllUser";
                window.open(url,'_self');
            }
        });

    });*/

</script>

</html>
